﻿using Devbridge.IPolice.DomainModel;
using FluentNHibernate.Mapping;

namespace Devbridge.IPolice.Repositories.Mappings
{
    public class OffenderMap : ClassMap<Offender>
    {
        public OffenderMap()
        {
            Table("Offender");

            Id(f => f.Id).GeneratedBy.Identity();

            Map(f => f.FirstName, "FirstName").Not.Nullable();
            Map(f => f.LastName, "LastName").Not.Nullable();
            Map(f => f.Address, "Address").Nullable();
        }
    }
}
